<template>
    <div class="disclaimer-main">
        <div class="com-header">
            <button @click="$router.go(-1)"><i></i></button>
            <span>隐私条款</span>
        </div>
        <!-- 网页内容区域 -->
        <div class="view-content">
            <div class="wrapper" v-html="content"></div>
        </div>
    </div>
</template>

<script>
import { Toast } from "mint-ui";
import api from '~/plugins/api.js'
import axios from 'axios'
export default {
    head: {
        title: "隐私条款  - 快眼看书",
        meta: [{
            name: "description",
            content: "快眼看书专注于玄幻小说搜索,新版快眼看书,提供最全的小说保持最快的更新,方便大家愉快地阅读玄幻小说"
        },{
            name: "keyWords",
            content: "隐私条款,快眼看书"
        }]
    },
    data() {
        return {
            content: ''
        }
    },
    created() {
        if(!process.server){
            this.initData()
        }
    },
    methods: {
        async initData() {
            let res = await axios.get(api.privacy)
            if(res){
                let data = res.data.data
               this.content = data
            }
        }
    },
    async asyncData(context){
         if(process.server){
            let res = await axios.get(api.privacy)
            if(res){
                let data = res.data.data
                return {content: data}
            }
         }
    }
};
</script>